/*
 * test_GPU.cpp
 *
 *  Created on: 2010-06-13
 *      Author: Daniel
 */

#include "../inc/test.h"
#include "../../inc/GPU_Backend.h"

#include <stdio.h>

int main(void) {
	printf("Testing GPU_Backend\n\n");
	_gpu_init();

	printf("Running test_vector_copy...");
	_test_vector_copy(&_gpu_vector_copy);
	printf("\tOK\n");

	printf("Running test_vector_literal...");
	_test_vector_literal(&_gpu_vector_literal);
	printf("\tOK\n");

	printf("Running test_vector_equal...");
	_test_vector_equal(&_gpu_vector_equal);
	printf("\tOK\n");

	printf("Running test_vector_nequal...");
	_test_vector_nequal(&_gpu_vector_nequal);
	printf("\tOK\n");

	printf("Running test_vector_plus_vector...");
	_test_vector_plus_vector(&_gpu_vector_plus_vector);
	printf("\tOK\n");

	printf("Running test_vector_minus_vector...");
	_test_vector_minus_vector(&_gpu_vector_minus_vector);
	printf("\tOK\n");

	printf("Running test_matrix_times_vector...");
	_test_matrix_times_vector(&_gpu_matrix_times_vector);
	printf("\tOK\n");

	printf("Running test_vector_times_matrix...");
	_test_vector_times_matrix(&_gpu_vector_times_matrix);
	printf("\tOK\n");

	printf("Running test_matrix_copy...");
	_test_matrix_copy(&_gpu_matrix_copy);
	printf("\tOK\n");

	printf("Running test_matrix_equal...");
	_test_matrix_equal(&_gpu_matrix_equal);
	printf("\tOK\n");

	printf("Running test_matrix_nequal...");
	_test_matrix_nequal(&_gpu_matrix_nequal);
	printf("\tOK\n");

	printf("Running test_matrix_plus_matrix...");
	_test_matrix_plus_matrix(&_gpu_matrix_plus_matrix);
	printf("\tOK\n");

	printf("Running test_matrix_minus_matrix...");
	_test_matrix_minus_matrix(&_gpu_matrix_minus_matrix);
	printf("\tOK\n");

	printf("Running test_matrix_times_matrix...");
	_test_matrix_times_matrix(&_gpu_matrix_times_matrix);
	printf("\tOK\n");

	printf("Running test_scalar_times_vector...");
	_test_scalar_times_vector(&_gpu_scalar_times_vector);
	printf("\tOK\n");

	printf("Running test_scalar_times_matrix...");
	_test_scalar_times_matrix(&_gpu_scalar_times_matrix);
	printf("\tOK\n");

	printf("Running test_vector_div_scalar...");
	_test_vector_div_scalar(&_gpu_vector_div_scalar);
	printf("\tOK\n");

	printf("Running test_matrix_div_scalar...");
	_test_matrix_div_scalar(&_gpu_matrix_div_scalar);
	printf("\tOK\n");
	
	_gpu_shutdown();

	return 0;
}
